<?php  
	namespace Admin\Controller;
	class ForgetController extends CommonController
	{
		public function index()
		{
			$list = M('look_forget')->select();
			$this -> assign('list',$list);
			$this -> display();
		}

		public function change()
		{
			$id = trim(I('id'));
			if (!empty($id)) 
			{
				$usid = $_SESSION['admin_info']['aid'];
				$m = new \Think\Model();
				$m -> execute("update y_forget set read_mian=\"$usid\" , is_read = '1' where id=\"$id\"");
				$m -> execute("delete from y_forget where id=\"$id\"");
			}
			$this -> redirect('Forget/index');
		}
	}